/*
if (typeof jQuery === "undefined") {
	var s = document.createElement('script');
	s.src = "http://ministore.mway.vn/static/js/jquery.js";
	document.head.appendChild(s);
}
function selectTab(option, rel) {
	var relop = option + rel;
	if (relop == ('new' + rel)) {
		jQuery('#new' + rel).show();
		jQuery('#tab_new' + rel).show().addClass('selected');
		jQuery('#tab_hot' + rel).removeClass('selected');
		jQuery('#hot' + rel).hide();
	} else {
		jQuery('#hot' + rel).show();
		jQuery('#tab_hot' + rel).show().addClass('selected');
		jQuery('#tab_new' + rel).removeClass('selected');
		jQuery('#new' + rel).hide();
	}
}
*/

function selectTab(option, rel) {
	var relop = option + rel;
	if (relop == ('new' + rel)) {
		document.getElementById('new' + rel).style.display = 'block';
		document.getElementById('tab_new' + rel).className = 'selected';
		document.getElementById('tab_hot' + rel).className = '';
		document.getElementById('hot' + rel).style.display = 'none';
	} else {
		document.getElementById('hot' + rel).style.display = 'block';
		document.getElementById('tab_hot' + rel).className = 'selected';
		document.getElementById('tab_new' + rel).className = '';
		document.getElementById('new' + rel).style.display = 'none';
	}
}

var mobileOS;
var mobileOSver;
function getOS(){
	var ua = navigator.userAgent;
	var uaindex;
	if (ua.match(/iPad/i) || ua.match(/iPhone/i))
	{
		mobileOS = 'iOS';
		uaindex = ua.indexOf('OS ');
	}
	else if (ua.match(/Android/i))
	{
		mobileOS = 'Android';
		uaindex = ua.indexOf('Android ');
	}
	else
	{
		mobileOS = 'unknown';
	}

	if (mobileOS === 'iOS' && uaindex > -1)
	{
		mobileOSver = ua.substr(uaindex + 3, 3).replace('_', '.');
	}
	else if (mobileOS === 'Android' && uaindex > -1)
	{
		mobileOSver = ua.substr(uaindex + 8, 3);
	}
	else
	{
		mobileOSver = 'unknown';
	}
}
